package com.youthburin.rmp.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.youthburin.base.domain.BaseVO;

/**
 * The persistent class for the rmp_permission database table.
 * 
 */
@Entity
@Table(name = "rmp_permission")
public class RmpPermission extends BaseVO implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String code;

	private String name;

	private String remark;

	// bi-directional many-to-one association to RmpPermissionType
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "TYPE_CODE")
	private RmpPermissionType rmpPermissionType;

	// bi-directional many-to-one association to RmpPermissionGroup
	@ManyToOne
	@JoinColumn(name = "GROUP_CODE")
	private RmpPermissionGroup rmpPermissionGroup;

	@Transient
	private boolean checked;// 是否选中

	public RmpPermission() {
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public RmpPermissionGroup getRmpPermissionGroup() {
		return this.rmpPermissionGroup;
	}

	public void setRmpPermissionGroup(RmpPermissionGroup rmpPermissionGroup) {
		this.rmpPermissionGroup = rmpPermissionGroup;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public RmpPermissionType getRmpPermissionType() {
		return rmpPermissionType;
	}

	public void setRmpPermissionType(RmpPermissionType rmpPermissionType) {
		this.rmpPermissionType = rmpPermissionType;
	}

}